package com.an.blog.mapper;

import com.an.blog.admin.domain.BlogArticle;
import com.an.blog.admin.domain.vo.BlogArticleVo;
import com.an.blog.web.domain.bo.BlogArticleWebBo;
import com.an.common.core.mapper.BaseMapperPlus;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 博客文章Mapper接口
 *
 * @author Ann
 * @date 2023-05-08
 */
public interface BlogArticleMapper extends BaseMapperPlus<BlogArticleMapper, BlogArticle, BlogArticleVo> {


    /**
     * 查询文章网络页面列表
     *
     * @param build        构建
     * @param articleWebBo 文章网址
     * @return {@link Page }<{@link BlogArticle }>
     * @author: Ann
     * @createDate: 2024/03/10
     * @version: 1.0.0
     */
    Page<BlogArticle> selectArticleWebPageList(@Param("page") Page<BlogArticle> build,
                                               @Param("articleWebBo") BlogArticleWebBo articleWebBo);

    /**
     * 选择喜欢和
     *
     * @return {@link Long }
     * @author: Ann
     * @createDate: 2023/11/16 14:57:02
     * @version: 1.0.0
     */
    Long selectLikedSum();

    /**
     * 选择文章列表4 ES
     *
     * @return {@link List }<{@link BlogArticle }>
     * @author Ann
     * @date 2024/06/05
     */
    List<BlogArticle> selectArticleList4Es();
}
